﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    Inherits="Nivdal.ForumConversations" Title=""
    StylesheetTheme="SkinFile" CodeBehind="ForumConversations.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, ForumConversations_PageNameLabel %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="PageTitleLabel" runat="server" Text="<%$ Resources:Resource, ForumConversations_PageNameLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:Panel ID="MessagePanel" runat="server">
            <asp:Label ID="MessageLabel" runat="server" SkinID="GreenSmallHeaderLabel"></asp:Label>
        </asp:Panel>
        <asp:Button ID="MarkAllAsReadButton" runat="server" Text="<%$ Resources:Resource, Global_MarkAllAsRead %>"
            message="<%$ Resources:Resource, ForumConversations_MarkAllAsReadOnClientClick %>"
            CssClass="GreenSmallButtonStyle" OnClientClick='return confirm(this.getAttribute("message"))'
            OnClick="MarkAllAsRead" />
        <br />
        <br />
        <asp:GridView ID="GetMyConversationGridView" AutoGenerateColumns="False" DataSourceID="ForumGetMyConversationSqlDataSource"
            runat="server" SkinID="FrumGrid" AllowPaging="True" PageSize="20">
            <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
            <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField ItemStyle-Width="45%">
                    <HeaderTemplate>
                        <asp:Label ID="ThreadNameLabel" runat="server" Text="<%$ Resources:Resource, ForumConversations_ThreadNameLabel %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="margin: 5px 15px 5px 15px;">
                            <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("ThreadName") %>' SkinID="BlackHyperLinkSkin"
                                NavigateUrl='<%# Eval("ThreadId", "ThreadDetails.aspx?ThreadId={0}") %>'></asp:HyperLink>
                            <br />
                            <asp:Label ID="Sograim1Label" runat="server" Text="(" SkinID="GridLabel"></asp:Label>
                            <asp:HyperLink ID="ThreadNameHyperLink" runat="server" Text='<%# Eval("ForumName") %>'
                                NavigateUrl='<%# Eval("ForumId", "ForumDetails.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                            <asp:Label ID="Sograim2Label" runat="server" Text=")" SkinID="GridLabel"></asp:Label>
                        </div>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, ForumConversations_PostsHeaderText %>"
                    ItemStyle-Width="10%">
                    <ItemTemplate>
                        &nbsp;
                        <asp:Label ID="NumUnreadPostsLabel" runat="server" Text='<%# Eval("NumUnreadPosts")%>'
                            SkinID="GreenGridLabel" Visible='<%# Eval("UnreadPostsExist") %>'> </asp:Label>
                        <asp:Label ID="InTheMiddleLabel" runat="server" Text="/" SkinID="GridLabel" Visible='<%# Eval("UnreadPostsExist") %>'></asp:Label>
                        <asp:Label ID="NumberOfPostsLabel" runat="server" Text='<%# Eval("NumPosts")%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_LastPost%>" ItemStyle-Width="25%">
                    <ItemTemplate>
                        &nbsp;
                        <asp:Label ID="LastPostDateLabel" runat="server" Text='<%# Eval("LastPostDate")%>'
                            SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="20%">
                    <HeaderTemplate>
                        <asp:Label ID="ForumNameLabel" runat="server" Text="<%$ Resources:Resource, ForumConversations_ForumNameLabel %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        &nbsp;
                        <asp:Image ID="OnlineImage" runat="server" ImageUrl="~/Images/Icons/IsOnline.png"
                            Visible='<%# Eval("IsOnline") %>' ToolTip="Online" />
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Icons/offline.png" Visible='<%# !((bool)Eval("IsOnline")) %>'
                            ToolTip="Offline" />
                        <asp:HyperLink ID="LastPostHyperLink" runat="server" Text='<%# Eval("LastPostByName") %>'
                            NavigateUrl='<%# Eval("LastPostUserId", "UserPage.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="NoconversationsRecentlyLabel" runat="server" Text="<%$ Resources:Resource, ForumConversations_NoconversationsRecentlyLabel %>"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="ForumGetMyConversationSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_ForumGetMyConversation" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <br />
        <br />
        <asp:LinkButton ID="MyForumHomePageHyperLink" PostBackUrl="~/ForumHomePage.aspx"
            Text="<%$ Resources:Resource, ForumConversations_MyForumHomePageHyperLink %>"
            runat="server" SkinID="TitleLink"></asp:LinkButton>
    </div>
    </div>
</asp:Content>
